home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 February / Macworld (1999-02).dmg / Serious Demos / XTension demo / Scripts / Time-Date Examples.On < prev    next >
Text File  |  1998-07-28  |  835b  |  33 lines

  1. -- This is a collection of example script statements
  2. --  Few of these scripts are complete in themselves,
  3. --   but rather are just syntactical examples.
  4. --  Test this script to see the results...
  5.  
  6. write log "the current date is " & (date string for (current date))
  7.  
  8. write log "the current time is " & (time string for (current time))
  9.  
  10. if time of (current date) > 12 * hours + 28 * minutes then
  11.     write log "it is after 12:28PM"
  12. else
  13.     write log "it is before 12:28PM"
  14. end if
  15.  
  16. if weekday of (current date) = Sunday then
  17.     write log "it's Sunday !"
  18. end if
  19.  
  20. if month of (current date) = August then
  21.     write log "it's August already!"
  22. end if
  23.  
  24. if year of (current date) < 2000 then
  25.     write log "it's not the millenium yet"
  26. else
  27.     write log "it's after the millenium!"
  28. end if
  29.  
  30.  
  31.  
  32. write log "value of LRlamp#2 is " & (value of "LRlamp#2") as string
  33.